import axios from '@/utils/request';

/**
 * 用户收藏列表
 * @param {PageListBaseRequest} data 
 * @return 
 */
export function apiCollectionList(data : PageListBaseRequest) : Promise<PageListBaseResponse<CollectionListItemInterface>> {
	return axios.post('/api/collection/lists', data)
}

/**
 * 添加收藏
 * @param {number} id 收藏ID
 * @return 
 */
export function apiCollectionAdd(id : number) : Promise<void> {
	return axios.post('/api/collection/add', { id })
}

/**
 * 删除收藏
 * @param {number} id 收藏ID
 * @return 
 */
export function apiCollectionDel(id : number) : Promise<void> {
	return axios.post('/api/collection/delete', { id })
}